package com.chimpansoft;

public final class Math {
	/*
	private static final BigDecimal aHalf = new BigDecimal(1).divide(new BigDecimal(2), MathContext.SCIENTIFIC);
	private static final BigDecimal e = new BigDecimal(java.lang.Math.E);
	private static final BigDecimal minusOne = new BigDecimal(-1);
	private static final BigDecimal theNull = new BigDecimal(0);
	private static final BigDecimal one = new BigDecimal(1);
	private static final BigDecimal two = new BigDecimal(2);
	private static final BigDecimal pi = new BigDecimal(java.lang.Math.PI);
	private static final BigDecimal precision = new BigDecimal(0.001);
	
	public static BigDecimal sin(BigDecimal a, MathContext mc) {

		return null;
	}

	public static BigDecimal cos(BigDecimal a, MathContext mc) {
		BigDecimal sum = new BigDecimal(0);
		BigDecimal add = new BigDecimal(1);
		BigDecimal i = new BigDecimal(0);
		
		BigDecimal minusOnePow;
		BigDecimal aPowTwo;
		BigDecimal twoI;
		
		while (add.compareTo(precision, mc) > 0) {
			minusOnePow = minusOne.pow(i);
			aPowTwo = a.pow(two.multiply(i));
			twoI = two.multiply(i);
			
			add = minusOnePow.multiply(aPowTwo).divide(fac(twoI));
			sum = sum.add(add);
			
			i.add(one);
		}
		
		return sum;
	}
	
	public static BigDecimal fac(BigDecimal n) {
		if (one.compareTo(n)  >= 1)
			return one;
		return n.multiply(fac(n.subtract(one)));
	}*/
}
